const express = require("express");
const messageRouter = express.Router();
const messageController = require("../Controller/message");

// 发布消息
messageRouter.post("/publishMessage", messageController.publishMessage);
// 获取公司公告
messageRouter.get("/getMessageList", messageController.getMessageList);
// 编辑消息
messageRouter.post("/editMessage", messageController.editMessage);
// 根据发布部门筛选消息
messageRouter.get(
  "/searchMessageByDepartment",
  messageController.searchMessageByDepartment
);
// 根据发布等级筛选消息
messageRouter.get(
  "/searchMessageByLevel",
  messageController.searchMessageByLevel
);
// 根据发布等级筛选消息
messageRouter.get("/searchMessage", messageController.searchMessage);
// 获取详细信息
messageRouter.get("/getMessage", messageController.getMessage);
// 更新点击率
messageRouter.post("/updateClick", messageController.updateClick);
// 放入回收站
messageRouter.post("/firstDelete", messageController.firstDelete);
// 获取回收站列表
messageRouter.get("/getRecycliList", messageController.getRecycliList);
// 还原
messageRouter.post("/recover", messageController.recover);
// 彻底删除
messageRouter.post("/deleteMessage", messageController.deleteMessage);

module.exports = messageRouter;
